home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 May: Tool Chest / Dev.CD May 98 TC.toast / Tool Chest / Testing & Debugging / Mac OS Development Toolkit / Automation Essentials 2.3.0 / Host Automation Folder / Clouseau libs / Custom.Lib < prev    next >
Encoding:
Text File  |  1998-03-19  |  5.4 KB  |  154 lines  |  [TEXT/MPS ]

  1. #########################################################################
  2. #########################################################################
  3. ##                     Copyright © Apple Computer, Inc. 1993-1997
  4. ##                                All rights reserved
  5. #########################################################################
  6. #########################################################################
  7. #    
  8. #    Library:        Custom.Lib
  9. #    
  10. #    Version:        2.1.4
  11. #    
  12. #    Description:    This library is intended to override the reference to
  13. #                    Custom.lib in scripts using the SPEC 1.2 libraries. To 
  14. #                    do this, the folder containing this library must be 
  15. #                    above the SPEC Libraries folder in the Library Search 
  16. #                    Path window.
  17. #                    
  18. #                    The most important task is InitCustom(). It is used to 
  19. #                    set SPEC global variables such as task references 
  20. #                    and TCS output methods, so that SPEC works the way 
  21. #                    HLQ Automation needs it to.
  22. #    
  23. #    Contains:
  24. #        InitCustom()
  25. #        CustomScrollWindow()
  26. #        CustomExitVU()
  27. #    
  28. #    History:
  29. #        Date:        By:        Changes:
  30. #         07/19/93    KTA        Created
  31. #         08/21/93    NMS        added CustomScrollWindow()
  32. #        08/21/94    SBR        added CustomExitVU() for experimentation
  33. #        09/04/95    SBR        Added this header for Radar 1273927.
  34. #                            Formatted according to standards.
  35. #        09/27/96    BRL/MSO    Updated copyright header
  36. #                            Use SPEC exception handling method (ExceptionHandling.lib)
  37. #        01/21/97    SBR        Deleted older exception code and comments.
  38. #    
  39. #########################################################################
  40. #########################################################################
  41.  
  42. Libraries
  43.     "ExceptionHandling.lib",
  44.     "Output.Lib", 
  45.     "UserInterface.Lib", 
  46.     "Report.lib";
  47.  
  48.  
  49. #########################################################################
  50. #                            InitCustom()
  51. #========================================================================
  52. # Author:        KTA
  53. # Description:    This has been provided as a mechanism for scriptwriters to 
  54. #                customize the SPEC S&L Libraries.  If the default value of
  55. #                and global variables is not what is desired, this is the 
  56. #                task where the script writer should reset any global values.  
  57. #                This task is called from InitGloabls() immediately after all
  58. #                global variables have been defined.
  59. #                Please refer to 'The Hitchhikers Guide' for more information 
  60. #                concerning any individual global variables.
  61. # Parameters:    None
  62. # Returns:        Nothing
  63. # Examples:        InitCustom();
  64. # Assumptions:     
  65. #########################################################################
  66. #========================================================================
  67. # History:
  68. #########################################################################
  69. TASK InitCustom() 
  70. begin
  71.     global gTestCaseLoggingMethod, kTCSNoLoggingMethod, kTCSResultsExpressMethod;
  72.     global gVerifyAppPriorToLaunch;
  73.     global gPrintSuiteInfo, gAdditionalTargetInfo;        
  74.     global gExitVU;
  75.     
  76. #        global gSeedValue := 28160;
  77. #        randomseed(gSeedValue);
  78.  
  79.     gVerifyAppPriorToLaunch    := 1;        # Do not launch the wrong version!
  80.  
  81.     # These "global constants" are defined in TCS.lib by the InitTCSLogging() task.
  82.     # However, we can not call InitTCSLogging() because it assumes you want
  83.     # kTCSResultsExpressMethod if gTestCaseLoggingMethod is undefined.
  84.     # A major conundrum if I ever did see one!!
  85.     # For now we will assume these "constants" will not change after SPEC 1.2.
  86.     kTCSNoLoggingMethod := 0;
  87.     kTCSResultsExpressMethod := 1;
  88.     
  89.     gTestCaseLoggingMethod    := kTCSNoLoggingMethod;
  90. #        gTestCaseLoggingMethod    := kTCSResultsExpressMethod;
  91.  
  92.     gPrintSuiteInfo            := 0;        
  93.     gAdditionalTargetInfo    := 0;        
  94.  
  95. #        gExitVU    := task CustomExitVU;        # Do not exit VU, see below.
  96. end;
  97.  
  98.  
  99.  
  100.  
  101. #########################################################################
  102. #                            CustomScrollWindow(xCoord, yCoord)
  103. #========================================================================
  104. # Author:        NS
  105. # Description:    Scrolls windows
  106. # Parameters:    xCoord, yCoord
  107. # Returns:        Nothing
  108. # Examples:        CustomScrollWindow();
  109. # Assumptions:    None 
  110. # Applications:    Any with scrollbars
  111. #========================================================================
  112. # History:
  113. #    09/27/96    BRL/MSO        Added SPEC exception handling
  114. #########################################################################
  115.  
  116. task CustomScrollWindow(xCoord := 200, yCoord := 200 )
  117. begin
  118.     LogStr('Now doing custom scrolling');
  119.  
  120.     try 
  121.         match[window s:document c:true g:true z:true r:?theWindRect]!;
  122.     catch theError
  123.         ExceptionDispatcher(theError,,{"CustomScrollWindow", {xCoord, yCoord}});
  124.  
  125.     SizeWindow(xCoord, yCoord);
  126.     TestWindow(,{3,7,5,9});     
  127.         ### NMS 9/24/93: Random and then back to top and left window scroll test
  128.     SizeWindow((theWindRect[3]-theWindRect[1]),(theWindRect[4]-theWindRect[2]));  
  129.                 ### NMS 9/24/93: Back to original size
  130. end;
  131.  
  132. #########################################################################
  133. #                            CustomExitVU()
  134. #========================================================================
  135. # Author:        SBR
  136. # Description:    This task replaces the default behavior of SPEC when a 
  137. #                task calls the ExceptionHandler, which exits VU. This is
  138. #                fine if you are using the VU MPW Tool, but not if you 
  139. #                have a VU driver script.
  140. # Parameters:    None
  141. # Returns:        Nothing
  142. # Examples:        CustomExitVU();
  143. # Assumptions:     
  144. #########################################################################
  145. #========================================================================
  146. # History:
  147. #########################################################################
  148. TASK CustomExitVU() 
  149. begin
  150.     trace(1);
  151. end;
  152.  
  153.  
  154.